package com.wc.alorithm_luogu.P1428;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/21 9:55
 * @description https://www.luogu.com.cn/problem/P1428
 * 小鱼比可爱
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        // 用桶子装可爱的鱼
        int[] cuteCount = new int[11];
        // 装答案
        int[] compareCuteFish = new int[n];

        int curFish;
        for (int i = 0; i < n; i++) {
            curFish = sc.nextInt();
            for (int j = 0; j < curFish; j++) {
                compareCuteFish[i] += cuteCount[j];
            }
            cuteCount[curFish]++;
        }
        System.out.print(compareCuteFish[0]);
        for (int i = 1; i < n; i++) {
            System.out.print(" " + compareCuteFish[i]);
        }
    }
}
